<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>顶</title>
<import type='css' file="css.main" />
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<script type="text/javascript">
$(function(){
	$(".searchtitle").click(function(){
		var href = $(this).attr("hrefs");
		var typeid = $("select[name='type']").val();
		var key = $.trim($(".skey").val());
		if(key==""){
			alert("关键词不能为空");
			return;	
		}
		window.open(encodeURI(href+"/typeid/"+typeid+"/key/"+key),"mainFrame");
	})
	/*--*/
	$(".searchma").click(function(){
		var href = $(this).attr("hrefs");
		var key = $.trim($(".skeyma").val());
		if(key==""){
			alert("关键词不能为空");
			return;
		}else{
			window.open(encodeURI(href+"/key/"+key),"mainFrame");
		}
	})
	document.onkeydown = function(e){
		var ev = document.all ? window.event : e;
		if(ev.keyCode==13) {
			return false;
		}
	}
})
</script>
</head>

<body>
<style>.top-search form{display:block; float:left; margin-left:50px;}</style>
<div class="top-bg" style="height:50px; line-height:50px;">
	<div class="top-logo">华人码管理系统</div>
	<div class="top-search">
		<form name="form1" id="form1" method="post">
			<label>华人码搜索：</label>
			<input name="key" class="searchkey skeyma" placeholder="搜索华人码"></input>
			<a class="searchbtn searchma" hrefs="{:rtrim(U('Search/indexma'),'.html')}" target="mainFrame">搜 索</a>
		</form>

		<form name="form2" id="form2" method="post">
			<label>按资源标题搜索：</label>
			<select name="type">
            	<option value="0" selected="selected">全部</option>
				<volist name='wymaselect' id='v'>
				<option value="{$v.id}">{$v.typename}</option>
				</volist>
			</select>
			<input name="key" class="searchkey skey" placeholder="搜索关键词"></input>
			<a class="searchbtn searchtitle" hrefs="{:rtrim(U('Search/index'),'.html')}" target="mainFrame">搜 索</a>
		</form>
	</div>
</div>
</body>
</html>
